# -*- coding: utf-8 -*-

import json

# https://docs.mirai.mamoe.net/mirai-api-http/api/MessageType.html#%E5%A5%BD%E5%8F%8B%E6%B6%88%E6%81%AF
import os

ALL_MSG_TYPES = [
    'FriendMessage',
    'GroupMessage',
    'TempMessage',
    'StrangerMessage',
    'OtherClientMessage',
    'FriendSyncMessage',
    'GroupSyncMessage',
    'TempSyncMessage',
    'StrangerSyncMessage',
]
DEV = False

# 摸鱼图片接口地址
MOYV_URL = 'https://api.j4u.ink/v1/store/other/proxy/remote/moyu.json'

try:
    cfg = json.load(open('cfg.json', mode='r', encoding='utf-8', errors='ignore'))
    ADDR = f'{cfg["ip"]}:{cfg["port"]}'
except Exception as e:
    cfg = {}
    ADDR = "127.0.0.1:8080"
    print("请确定cfg.json的位置, 当前位置：", os.getcwd(), e)

MO_YV_CONF_KEYWORD = "moyv"
QING_YUN_KE_CONF_KEYWORD = "qingYunKe"

CODE2VAL = {}
for k in "3456789":
    CODE2VAL[k] = int(k)
CODE2VAL["0"] = 10
CODE2VAL["j"] = 11
CODE2VAL["q"] = 12
CODE2VAL["k"] = 13
CODE2VAL["a"] = 14
CODE2VAL["1"] = 14
CODE2VAL["2"] = 20
CODE2VAL["x"] = 50
CODE2VAL["y"] = 100
